package com.bingxue.edu.management.education.model.req;

import com.bingxue.edu.common.enums.TermEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.List;

/**
 * 创建或修改排课模板信息
 *
 * @author zq
 * @since 2024/08/21 00:02
 */
@Data
@Schema(description = "创建或修改排课模板信息")
public class ArrangeTemplateReq {

    @Schema(description = "模板名称（用于家长展示）")
    @NotBlank(message = "模板名称不能为空")
    @Length(max = 32, message = "模板名称长度不能超过 {max} 个字符")
    private String name;

    @Schema(description = "完整名称（用于内部展示）")
    @NotBlank(message = "完整名称不能为空")
    @Length(max = 32, message = "模板名称长度不能超过 {max} 个字符")
    private String fullName;

    @Schema(description = "上课年份")
    @NotNull(message = "上课年份不能为空")
    private Integer classYear;

    @Schema(description = "学期code")
    private TermEnum term;

    @Schema(description = "年级code")
    @NotBlank(message = "年级code不能为空")
    private String grade;

    @Schema(description = "课次")
    @NotEmpty(message = "课次列表不能为空")
    private List<ArrangeLessonReq> arrangeLessonList;
}
